package com.threegroup.admin.controller;

import com.threegroup.admin.entity.DictType;
import com.threegroup.admin.service.ISysDictTypeService;
import com.threegroup.common.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 字典类型
 */
@RestController
@RequestMapping("sys/dict/type")
public class SysDictTypeController {

    @Resource
    private ISysDictTypeService sysDictTypeService;

    @GetMapping("all")
    public Result<List<DictType>> all(){
        List<DictType> list = sysDictTypeService.getAllList();

        return new Result<List<DictType>>().ok(list);
    }

}
